﻿
@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <script src="~/plugins/mzui/js/mzui.min.js"></script>
    <link href="~/plugins/mzui/css/mzui.min.css" rel="stylesheet" />
    <title>会员消费</title>
</head>
<body class="with-nav-bottom">
    <div id="ss" class="row" style="margin-left:3px;margin-top:8px;">
        <select name="pay_status">
            <option value="0" selected="">= 全部状态 =</option>
            @foreach (string name in Enum.GetNames(typeof(LJShengHelper.PayStatus)))
            {
                LJShengHelper.PayStatus type = (LJShengHelper.PayStatus)Enum.Parse(typeof(LJShengHelper.PayStatus), name, true);
                <option value="@((int)type)">@name</option>
            }
        </select>
        <div class="col-xs-3" style="width: 80px;">
            <input type="text" placeholder="经销商" name="account" class="form-control" />
        </div>
        <div class="col-xs-3" style="width: 80px;">
            <input type="text" placeholder="套餐名称" name="name" class="form-control" />
        </div>
        <div class="col-xs-3l" style="width: 150px;">
            <input type="text" placeholder="卡密" name="kami" class="form-control" />
        </div>
        <div class="col-xs-3" style="width: 150px;">
            <input type="text" placeholder="提交内容" name="post" class="form-control" />
        </div>
        <div class="col-xs-3" style="width: 150px;">
            <input type="text" placeholder="订单号" name="order_no" class="form-control" />
        </div>
        <div>
            <i class="icon icon-search" onclick="getlist(1);"></i>
        </div>
    </div>
    <table class="table bordered white">
        <thead>
            <tr class="purple-pale">
                <th>卡密</th>
                <th>套餐天数</th>
                <th>价格</th>
                <th>验证信息</th>
                <th>状态</th>
            </tr>
        </thead>
        <tbody id="tbody">
            <script id="tpl" type="text/html">
                {{each list as item index}}
            <tr onclick="fkxx('{{item.order_no}}','{{item.name}}','{{item.rmb}}','{{item.ptf}}','{{item.num}}','{{item.addtime}}','{{item.pay_time}}','{{item.remarks}}','{{item.tianshu}}','{{item.coupon_number}}');">
                <td>{{item.coupon_number}}</td>
                <td>{{item.name}} <span class="label label-badge label-primary label-outline red">{{item.tianshu}}</span>天</td>
                <td>{{item.user_cash}}</td>
                <td>{{item.remarks}}</td>
                <td><div class="label outline rounded {{item.pay_status=="1"?"success":"danger"}}">{{item.pay_status=="1"?"已验证":"未验证"}}</div></td>
            </tr>
            {{/each}}
            </script>
        </tbody>
        <tfoot>
            <tr>
                <th colspan="4" id="nextpage" class="title text-center" onclick="getlist(document.getElementById('pageindex').innerHTML,0);">显示更多 <i class="icon icon-double-angle-down"></i></th>
            </tr>
        </tfoot>
    </table>
    <!-- 付款信息 -->
    <div id="fkxx" class="affix dock-bottom modal hidden" style="margin-bottom:50px;">
        <div class="heading">
            <div class="title">订单号:<strong id="order_no"></strong></div>
            <nav class="nav"><a onclick="closefk();"><i class="icon-remove muted"></i></a></nav>
        </div>
        <table class="table bordered blue">
            <tbody>
                <tr>
                    <td>卡密</td>
                    <td id="coupon_number"></td>
                </tr>
                <tr>
                    <td>套餐名称</td>
                    <td id="name"></td>
                </tr>
                <tr>
                    <td>订单总价</td>
                    <td id="rmb"></td>
                </tr>
                <tr>
                    <td>下单折扣</td>
                    <td id="ptf"></td>
                </tr>
                <tr>
                    <td>卡密数量</td>
                    <td id="num"></td>
                </tr>
                <tr>
                    <td>下单时间</td>
                    <td id="addtime"></td>
                </tr>
                <tr>
                    <td>验证时间</td>
                    <td id="pay_time"></td>
                </tr>
            </tbody>
        </table>
    </div>
    <label id="pageindex" class="hidden">0</label><label id="pages" class="hidden">1</label>
    <label id="Controllers" class="hidden">/shop/orderlist</label>
    <script src="~/js/template-web.js"></script>
    <script src="~/js/mlist.js"></script>
    <script src="~/js/image.js"></script>
    <script src="~/js/jquery.js"></script>
    <script>
        $("#chaimg").on('change', function () {
            if ($("#plgid").val() != "0") {
                url = "/ajax/api.ashx?ff=chaimg";
                id = "chaimg";
                data = {
                    plgid: $("#plgid").val(),
                    lx: 2
                }
                loadImageFile(id);
            }
            else {
                alert("请先评价后在上传图片!");
            }
        });
        function setradio(lx) {
            document.getElementById("lx").value = lx;
            if (lx == 3) {
                $("#img").removeClass("hidden");
            }
            else {
                $("#img").addClass("hidden");
            }
        }
        function closefk() {
            $("#fkxx").addClass("hidden");
        }
        function fkxx(order_no, name, rmb, ptf, num, addtime, pay_time, remarks, tianshu, coupon_number) {
            $("#order_no").html(order_no);
            $("#coupon_number").html(coupon_number);
            $("#name").html(name);
            $("#rmb").html(rmb);
            $("#ptf").html(ptf);
            $("#num").html(num);
            $("#addtime").html(addtime);
            $("#pay_time").html(pay_time);
            $("#tianshu").html(tianshu);
            $("#fkxx").removeClass("hidden");
        }
        function pj() {
            if (document.getElementById("tomsg").value != "") {
                $.ajax({
                    url: "/ajax/api.ashx",
                    data: "ff=pj&cpgid=" + $("#cpgid").val() + "&plgid=" + $("#plgid").val() + "&ddgid=" + $("#ddgid").val() + "&lx=0&pf=" + $("#lx").val() + "&msg=" + $("#tomsg").val() + "&Cache=" + Math.random(),
                    type: "post",
                    cache: false,
                    timeout: 8000,
                    dataType: "json",
                    ContentType: "application/json; charset=utf-8",
                    error: function () { alert("AJAX Error"); },
                    beforeSend: function () { },
                    success: function (data) {
                        $("#pj").text(data.data.msg);
                    },
                });
            }
            else {
                alert("请输入评价内容!");
            }
        }
    </script>
</body>
</html>
